<!DOCTYPE html>
<html>

<body>
  <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
  <script>
    // 模拟前端项目的 baseUrl 配置
    window.baseUrl = "https://console-ams-api-dev.ntplat.com"; // 生产环境（需与插件中配置的 productionBaseUrl 一致）
    axios.defaults.baseURL = window.baseUrl;

    // 提供测试按钮
    function testFetch() {
      fetch(window.baseUrl + "/api/data").then(res => console.log("fetch 响应:", res));
    }
    function testAxios() {
      axios.get("/api/data?token=919edf8e17d3458ba72dbf0584f97f05&userId=55&appId=1001&environment=1").then(res => console.log("axios 响应:", res));
    }
    function testAxios1() {
      axios.get("/enter/get/mid/environment?token=919edf8e17d3458ba72dbf0584f97f05&userId=55&appId=1001&environment=1").then(res => console.log("axios 响应:", res));
    }
  </script>
  <button onclick="testFetch()">测试 fetch 请求</button>
  <button onclick="testAxios()">测试 axios 请求</button>
  <button onclick="testAxios1()">测试 axios 请求1</button>
</body>

</html>